package com.ews.onlineexchange.service;

import java.io.Serializable;

import javax.ejb.Stateless;

import com.ews.onlineexchange.util.SmsSender;

@Stateless
public class BlackListService implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public boolean validateUserInBlackList( String cnname, String creditCode ) {
//		String VALIDATOR_URL = "http://192.168.1.31:8080/f/rest/creditBlack";
//		Client client = ClientBuilder.newClient();
//		VALIDATOR_URL += "?unitName=" + cnname + "&no" + creditCode;
//		String result = client.target( VALIDATOR_URL ).request( MediaType.APPLICATION_JSON ).get( String.class );
//		StringReader stringReader = new StringReader( result );
//		try ( JsonReader jsonReader = Json.createReader( stringReader ) ) {
//			JsonArray jarr = jsonReader.readArray();
//			if ( !jarr.isEmpty() ) {
//				return true;
//			}
//		}
		return false;
	}

	private final String	SMS_URL		= "http://api.cloudfeng.com/api/v1/manySend";
	private final String	APP_KEY		= "GIX47sxC8hr2c2fq5yjkxr1myBEEpUO2";
	private final String	APP_SECRET	= "415ba51e1db33ad2a09d1ca9086020603532";
	private final String	NONCE_STR	= "zzrj123";
	// 短信类型 verify_code：验证码类 、notice 通知类 、advert 营销类
	private final String	SMS_TYPES[]	= { "verify_code", "notice", "advert" };
	private final String	TITLE		= "卓智软件";

	public void sendSms( String tele, String content ) {
		
	}

}
